package com.dhsc.local.dao.impl.ywzj.kbpzgl.pzlxwh;

import com.dhsc.domain.ywzx.kbpzgl.PzgllxxxVo;
import com.dhsc.domain.ywzx.kbpzgl.PzlxwhVo;
import com.dhsc.local.dao.ywzj.kbpzgl.pzlxwh.IPzlxwhDao;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 凭证类型维护
 * @date 2024/4/9 15:50
 */
@Repository("pzlxwhDao")
public class PzlxwhDaoImpl implements IPzlxwhDao {

    @Autowired
    private SqlSessionTemplate localSqlSessionTemplate;

    @Override
    public List<PzlxwhVo> queryPzlxwhinfo(PzlxwhVo p) {
        return localSqlSessionTemplate.selectList("PzlxwhMapper.queryPzlxwhinfo",p);
    }

    @Override
    public int savePzlxwhxx(PzlxwhVo p) {
        return localSqlSessionTemplate.insert("PzlxwhMapper.savePzlxwhxx",p);
    }

    @Override
    public int savePzlxwhWjxx(PzlxwhVo p) {
        return localSqlSessionTemplate.insert("PzlxwhMapper.savePzlxwhWjxx",p);
    }

    @Override
    public int updatePzlxwhxx(PzlxwhVo p) {
        return localSqlSessionTemplate.update("PzlxwhMapper.updatePzlxwhxx",p);
    }

    @Override
    public int updatelxwhWjxx(PzlxwhVo p) {
        return localSqlSessionTemplate.update("PzlxwhMapper.updatelxwhWjxx",p);
    }

    @Override
    public PzlxwhVo queryPzlxNewId() {
        return localSqlSessionTemplate.selectOne("PzlxwhMapper.queryPzlxNewId");
    }

    @Override
    public int deletePzlx(PzlxwhVo p) {
        return localSqlSessionTemplate.delete("PzlxwhMapper.deletePzlx",p);
    }

    @Override
    public int deletePzlxWj(PzlxwhVo p) {
        return localSqlSessionTemplate.delete("PzlxwhMapper.deletePzlxWj",p);
    }

    @Override
    public List<PzgllxxxVo> queryPzgllxxx(PzgllxxxVo p) {
        return localSqlSessionTemplate.selectList("PzlxwhMapper.queryPzgllxxx",p);
    }

    @Override
    public int updatePzgllxxx(PzgllxxxVo p) {
        return localSqlSessionTemplate.update("PzlxwhMapper.updatePzgllxxx",p);
    }

    @Override
    public int insertDxfsnr(PzgllxxxVo p) {
        return localSqlSessionTemplate.insert("PzlxwhMapper.insertDxfsnr",p);
    }

    @Override
    public List<PzgllxxxVo> queryYwzxPzglyyb(PzgllxxxVo p) {
        return localSqlSessionTemplate.selectList("PzlxwhMapper.queryYwzxPzglyyb",p);
    }

}
